1. Field of the Invention
This invention relates to an electronic control unit having multiple microprocessors, and particularly to an electronic control unit where on-board loading of a control program and control data into each of the microprocessors is possible.
2. Description of Related Art
As disclosed for example in Japanese Patent Application Laid-Open No. Hei 2-99746, electronic control units for vehicles have been proposed which include a microprocessor having a nonvolatile memory such as an EEPROM or a flash EEPROM (hereinafter referred to as a flash memory) electrically reloadable with data and are constructed so that a control program and control data stored in this nonvolatile memory can be reloaded even after the electronic control unit is supplied to the market.
In an electronic control unit of this kind, during normal operation the microprocessor controls an object of control such as an engine by executing a control program made up of data stored in the nonvolatile memory. When the data (a control program and control data referred to in the execution of the control program) stored in the nonvolatile memory is to be reloaded, a separate memory loading unit is connected to the electronic control unit and the memory loading unit and the microprocessor are thereby connected by way of a communication line. Then, when predetermined reloading conditions are established, the microprocessor carries out a loading process wherein it receives load data (i.e., data constituting a new control program and new control data) transmitted to it from the memory loading unit and loads this load data into the nonvolatile memory as an update.
Therefore, with this kind of electronic control unit, because it becomes possible to carry out so-called on-board loading, in which a control program and control data are loaded into the nonvolatile memory of the microprocessor after the microprocessor has been mounted in the electronic control unit, even if it is necessary to change the content of the operation of the unit (the control content) after the unit is supplied to the market, this can be done easily.
Also, in the case of this kind of electronic control unit in which on-board loading is possible, in the process of manufacturing the unit it is possible to newly load a control program and control data into the nonvolatile memory of the microprocessor after the microprocessor is mounted in the unit.
However, in recent years, among electronic control units of this type, as their control content has become more complex, units having multiple microprocessors have become the norm, and there has been a need for this kind of electronic control unit to be constructed so that on-board loading is possible with respect to each of these multiple microprocessors.
Also, generally, in an electronic control unit having a microprocessor, to ensure safety of the control performed by the unit it is necessary to monitor whether or not the control program is being executed normally in the microprocessor and for the microprocessor to be reset (initialized) when an abnormality occurs.
In the case of an electronic control unit having multiple microprocessors, sometimes a specified microprocessor monitors the operation of another microprocessor (whether or not a control program is being executed normally by other than that microprocessor) and resets that other microprocessor when it detects a failure. If this kind of construction is employed, because it is not necessary to provide a hardware circuit such as a so-called a watchdog circuit for monitoring the microprocessor for each microprocessor, safety of control can be ensured with a simple unit construction.
However, when an electronic control unit in which on-board loading with respect to each of multiple microprocessors is possible as described above and also a specified microprocessor monitors the operation of another microprocessor, the following problem arises.
That is, in the process of manufacturing the electronic control unit, after the microprocessors are mounted, when first a control program and so on are newly loaded into a monitoring side microprocessor (hereinafter called the monitoring microprocessor) which is to monitor another microprocessor and then after that an attempt is made to newly load a control program and so on into a monitored side microprocessor (hereinafter called the monitored microprocessor), whereas the monitoring microprocessor executes the control program already loaded into it and performs its normal operation, the monitored microprocessor does not execute its normal control program and instead carries out a loading process, and consequently the monitored microprocessor is determined by the monitoring microprocessor to have suffered a failure. As a result, the monitored microprocessor performing the loading process (in other words in the process of loading a control program and so on) is reset by the operation of the monitoring microprocessor and it becomes impossible to carry out loading of the control program and so on with certainty.
Further, to satisfy the need for independent reloadability of multiple microprocessors by applying the related art disclosed in Japanese Laid-Open Patent Publication No. Hei 7-311603, it is conceivable to employ a method wherein for each microprocessor a communication circuit and a communication line for carrying out data communication between the microprocessor and external circuitry are provided and a memory loading unit is selectively connected exclusively to the communication circuit and the communication line corresponding to the microprocessor into which a control program and control data are to be reloaded.
However, when this kind of construction is used, data communication hardware such as a communication circuit must be provided for each microprocessor, and consequently the unit becomes large and its cost increases.
If, on the other hand, a construction is employed wherein all of the microprocessors mounted in the electronic control unit use a single communication line commonly to carry out data communication with external devices such as a memory loading unit, although less data communication hardware is required, when this kind of construction is adopted simply, the following problem arises.
That is, while reloading of data into the nonvolatile memory of any one microprocessor is being carried out, if another microprocessor transmits data to the communication line, the data being received by the microprocessor carrying out a loading process for data reloading is destroyed by the data transmitted from the other microprocessor and, as a result of this, incorrect data is loaded into the nonvolatile memory of the microprocessor that is the object of the data reloading.